package com.huiminpay.transaction.api.service;

import com.huiminpay.common.cache.domain.BusinessException;
import com.huiminpay.transaction.api.dto.PayChannelDTO;
import com.huiminpay.transaction.api.dto.PayChannelParamDTO;
import com.huiminpay.transaction.api.dto.PlatformChannelDTO;

import java.util.List;

public interface IPlatformChannelService {
    /**
     * 查询平台提供的所有服务
     * @return
     */
    List<PlatformChannelDTO> findAllPlatformChannel();

    /**
     * 应用绑定服务
     * @param appId
     * @param platformChannel
     * @return
     * @throws BusinessException
     */
    Object bindPlatformForApp(String appId, String platformChannel) throws BusinessException;

    /**
     * 查询应用已绑定的服务
     * @param appId
     * @param platformChannel
     * @return
     */
    int queryAppBindPlatformChannel(String appId, String platformChannel);

    /**
     *查询服务已绑定的支付通道
     * @return
     */
    List<PayChannelDTO> queryPayChannelsByPlatfrom(String PlatformChannelCode );

    /**
     /* 保存支付渠道参数
     /* @param payChannelParam 商户原始支付渠道参数
     */
    void savePayChannelParam(PayChannelParamDTO payChannelParam) throws BusinessException;

    /**
     * 查询指定支付通道参数
     * @param appId
     * @param platformChannel
     * @param payChannel
     * @return
     */
    PayChannelParamDTO queryParamByAppPlatformAndPayChannel(String appId, String platformChannel, String payChannel);

    /**
     * 查询全部支付通道参数
     * @param appId
     * @param platformChannel
     * @return
     */
    List<PayChannelParamDTO> queryPayChannelParam(String appId, String platformChannel);
}
